/**
 * Author: Sam
 * Description: Bill class is a warper class of Order for management.
 * and now provide additional function to Order
 * 
 */
package GoldenEagle;

public class Bill implements Displayable {

	Order order;

	public Bill(Order orderNum) {
		order = orderNum;
	}

	public void display() {

		System.out.print("Bill:\n");

		System.out.print("Customer Number: " + order.getNumOfCustomer());

		for (int i = 0; i < order.size(); i++) {
			System.out.print("\n" + order.getMenuSubject(i));
		}

		System.out.print("\nTotle Price: $" + order.totalPrice());
		System.out.print("\nPrice for each people: $" + getPayAverage());

	}

	public float getPayAverage() {
		float total = order.totalPrice();

		return total / order.getNumOfCustomer();

	}

	public boolean print() {
		return false;
	}

}
